‹#›
Autodesk Inventor 定制开发在线培训 2010
5.Arrays
§.Net 数组的下限始终是 0.
§不能用:
Dim adCoords(1 To 9) As Double
§只能用:
Dim adCoords(8) As Double
§ 需要修改相应代码中不同的索引值
§重新定义数组尺寸时，无法指定类型
§不能用:
ReDim adCoords(18) As Double
§只能用:
ReDim adCoords(18)
§.NET 中，当数组没有被初始化时，有时候会生成警告消息
Dim adCoords(18) As Double = {}
•
§
§
•VB 和 VB.Net 不同之处（续）
Dim adCoords(1 To 9) As Double
Dim adCoords(8) As Double
ReDim adCoords(18) As Double
ReDim adCoords(18)
Dim adCoords() As Double = {}

| - The lower value of an array is always 0, so you have to adjust your code to follow this
| - when redimensioning you can only change the dimension but not the type
| - it’s better to just initialize the arrays you define, otherwise some of the code might just not work